﻿using System;
using System.Runtime.InteropServices;
using UnityEngine;

namespace UniRx.Diagnostics
{
	// Token: 0x020003B2 RID: 946
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	public struct LogEntry
	{
		// Token: 0x06001357 RID: 4951 RVA: 0x000587C4 File Offset: 0x00056BC4
		public LogEntry(string loggerName, LogType logType, DateTime timestamp, string message, UnityEngine.Object context = null, Exception exception = null, string stackTrace = null, object state = null)
		{
			this = default(LogEntry);
			this.LoggerName = loggerName;
			this.LogType = logType;
			this.Timestamp = timestamp;
			this.Message = message;
			this.Context = context;
			this.Exception = exception;
			this.StackTrace = stackTrace;
			this.State = state;
		}

		// Token: 0x1700014F RID: 335
		// (get) Token: 0x06001358 RID: 4952 RVA: 0x00058815 File Offset: 0x00056C15
		// (set) Token: 0x06001359 RID: 4953 RVA: 0x0005881D File Offset: 0x00056C1D
		public string LoggerName { get; private set; }

		// Token: 0x17000150 RID: 336
		// (get) Token: 0x0600135A RID: 4954 RVA: 0x00058826 File Offset: 0x00056C26
		// (set) Token: 0x0600135B RID: 4955 RVA: 0x0005882E File Offset: 0x00056C2E
		public LogType LogType { get; private set; }

		// Token: 0x17000151 RID: 337
		// (get) Token: 0x0600135C RID: 4956 RVA: 0x00058837 File Offset: 0x00056C37
		// (set) Token: 0x0600135D RID: 4957 RVA: 0x0005883F File Offset: 0x00056C3F
		public string Message { get; private set; }

		// Token: 0x17000152 RID: 338
		// (get) Token: 0x0600135E RID: 4958 RVA: 0x00058848 File Offset: 0x00056C48
		// (set) Token: 0x0600135F RID: 4959 RVA: 0x00058850 File Offset: 0x00056C50
		public DateTime Timestamp { get; private set; }

		// Token: 0x17000153 RID: 339
		// (get) Token: 0x06001360 RID: 4960 RVA: 0x00058859 File Offset: 0x00056C59
		// (set) Token: 0x06001361 RID: 4961 RVA: 0x00058861 File Offset: 0x00056C61
		public UnityEngine.Object Context { get; private set; }

		// Token: 0x17000154 RID: 340
		// (get) Token: 0x06001362 RID: 4962 RVA: 0x0005886A File Offset: 0x00056C6A
		// (set) Token: 0x06001363 RID: 4963 RVA: 0x00058872 File Offset: 0x00056C72
		public Exception Exception { get; private set; }

		// Token: 0x17000155 RID: 341
		// (get) Token: 0x06001364 RID: 4964 RVA: 0x0005887B File Offset: 0x00056C7B
		// (set) Token: 0x06001365 RID: 4965 RVA: 0x00058883 File Offset: 0x00056C83
		public string StackTrace { get; private set; }

		// Token: 0x17000156 RID: 342
		// (get) Token: 0x06001366 RID: 4966 RVA: 0x0005888C File Offset: 0x00056C8C
		// (set) Token: 0x06001367 RID: 4967 RVA: 0x00058894 File Offset: 0x00056C94
		public object State { get; private set; }

		// Token: 0x06001368 RID: 4968 RVA: 0x000588A0 File Offset: 0x00056CA0
		public override string ToString()
		{
			string text = (this.Exception == null) ? string.Empty : (Environment.NewLine + this.Exception.ToString());
			return string.Concat(new string[]
			{
				"[",
				this.Timestamp.ToString(),
				"][",
				this.LoggerName,
				"][",
				this.LogType.ToString(),
				"]",
				this.Message,
				text
			});
		}
	}
}
